<?php
/**
 * Created by PhpStorm.
 * User: sl
 * Date: 17-6-23
 * Time: 下午11:05
 */

namespace ActionsHttp;


use Data\Tree_customer_info_DAO;

class CustomerLogout extends BaseActionHttp
{
    public function doAction() {
        parent::doAction();
        $customer_id_random_str = $this->data[CUSTOMER_ID];
        $customer_id = substr($customer_id_random_str,10);
        $customer_record = Tree_customer_info_DAO::getRecord($customer_id);

        if ($customer_record) {
            $customer_record->setLOGIN_TIME(0);
            Tree_customer_info_DAO::update($customer_record);
        }

        // 返回数据
        $this->ResponseDataToCurrentClient();
    }
}